public class Test7 {
    public static void main(String[] args) {
        extendThread extendThread = new extendThread(() -> System.out.println("implementThread::run()"));
        extendThread.start();

        System.out.println(extendThread.getName());
        System.out.println(extendThread.getPriority());
        extendThread.setName("extendThread");
        extendThread.setPriority(6);
        System.out.println(extendThread.getPriority());
        System.out.println(extendThread.getName());
    }

//    @Test
//    public void test() {
//        Thread thread = new Thread(() -> {
//            System.out.println("ImplementThread::run()");
//
//        });
//    }
}

class extendThread extends Thread {
    public extendThread() {
    }

    public extendThread(Runnable task) {
        super(task);
    }

    @Override
    public void run() {
        System.out.println("extendThread::run()");
        System.out.println(this == Thread.currentThread());
    }
}